
#pragma once

#include "base/core/singleton.h"
#include "Common/TableDefine.h"


class CampOfficialCfg : public ManualSingleton <CampOfficialCfg>
{
	friend ManualSingleton <CampOfficialCfg>;
public:
	CampOfficialCfg();
	~CampOfficialCfg();
	bool Init(const char *szCfgFile, const char *szSplitChar);
	bool UnInit();
	void Clear();
	const CampOfficialCfgInfo *GetCampOfficialCfgInfo(int32_t officialId);
	const CampOfficialCfgMap *GetCampOfficialCfgMap() { return &m_CampOfficialCfgMap; }
private:
	CampOfficialCfgMap m_CampOfficialCfgMap;
};

#define  g_MakeCampOfficialCfgTable() (CampOfficialCfg::Instance())
#define  g_GetCampOfficialCfgTable() (CampOfficialCfg::GetInstance())
#define  g_DelCampOfficialCfgTable() (CampOfficialCfg::Destroy())